package gobelinmaker.client;

import java.awt.BorderLayout;
import java.awt.Toolkit;

/**
 * Letapogatott kanafa megjelenítésének ablaka.
 *
 * @author imruf84
 */
public class DiscoveredHolesFrame extends javax.swing.JFrame {

    /**
     * Megjelenítő panel.
     */
    private final DiscoveredHolesPanel holesPanel;

    /**
     * Konstruktor.
     *
     * @param sp szerver
     */
    public DiscoveredHolesFrame(ServerPanel sp) {

        initComponents();

        // Szkriptszerkesztő panel létrehozása.
        holesPanel = new DiscoveredHolesPanel(sp);
        this.getContentPane().add(holesPanel, BorderLayout.CENTER);

        this.pack();

        // Ablak pozicionálása.
        this.setLocationRelativeTo(null);
    }

    /**
     * Panel lekérdezése.
     *
     * @return panel
     */
    public DiscoveredHolesPanel getHolesPanel() {
        return this.holesPanel;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Letapogatott kanava");
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("icons/MainFrameIcon.png")));

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
